<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>仿天猫首页的类别展示效果</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .main {
            width: 235px;
            height: 330px;
            border: 1px solid #ccc;
            margin: 10px auto;
            padding: 4px;
        }

        .m_img {
            height: 200px;
            margin-top: 10px;
            position: relative;
        }

        .m_img img {
            width: 186px;
            height: 200px;
            cursor: pointer;
            position: absolute;
            top: 0;
            left: 24px;
            transition: all .5s;
        }

        .m_img img:hover {
            left: 16px;
        }

        .m_desc, .m_price {
            margin-top: 10px;
            padding: 4px;
        }

        .m_desc h4, .m_price h4 {
            font-size: 16px;
            font-size: bold;
        }

        .m_desc p {
            color: #666;
            font-size: 14px;
            padding: 2px 2px 10px 0;
            border-bottom: 1px dotted #ccc;
        }

        .m_price h4 {
            float: left;
            width: 50%;
        }

        .m_price p {
            width: 50%;
            float: right;
            text-align: right;
            color: #666;
            font-size: 14px;
        }

        .clearfix {
            clear: both;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="m_img clearfix">
            <img src="../images/phone/p30pro.png" alt="华为P30Pro">
        </div>
        <div class="m_desc">
            <h4>华为P30 Pro</h4>
            <p>旗舰新品，限量抢购</p>
        </div>
        <div class="m_price">
            <h4>¥4988</h4>
            <p>已售:31385</p>
        </div>
    </div>
</body>
</html>